let lines = [1,2,1,,3,4,5,6]

const highets = (lines) =>{
    const map = new Map()
    for(let i=0;i<lines.length;i++){
        item = lines[i]
        if(map.has(item)){
            map[item]=map[item]+1
        }
        else{
            map[item] = 1
        }
    }
    return map
}
console.log(highets(lines));
